package com.sanqi.work.service.impl;

import java.util.List;
import com.sanqi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.sanqi.work.mapper.WorkScoreConfMapper;
import com.sanqi.work.domain.WorkScoreConf;
import com.sanqi.work.service.IWorkScoreConfService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * 工作指标配置Service业务层处理
 * 
 * @author duany
 * @date 2025-11-08
 */
@Service
public class WorkScoreConfServiceImpl extends ServiceImpl<WorkScoreConfMapper, WorkScoreConf> implements IWorkScoreConfService 
{
    @Autowired
    private WorkScoreConfMapper workScoreConfMapper;

    /**
     * 查询工作指标配置
     * 
     * @param id 工作指标配置主键
     * @return 工作指标配置
     */
    @Override
    public WorkScoreConf selectWorkScoreConfById(String id)
    {
        return workScoreConfMapper.selectWorkScoreConfById(id);
    }

    /**
     * 查询工作指标配置列表
     * 
     * @param workScoreConf 工作指标配置
     * @return 工作指标配置
     */
    @Override
    public List<WorkScoreConf> selectWorkScoreConfList(WorkScoreConf workScoreConf)
    {
        return workScoreConfMapper.selectWorkScoreConfList(workScoreConf);
    }

    /**
     * 新增工作指标配置
     * 
     * @param workScoreConf 工作指标配置
     * @return 结果
     */
    @Override
    public int insertWorkScoreConf(WorkScoreConf workScoreConf)
    {
        return save(workScoreConf) ? 1 : 0;
    }

    /**
     * 修改工作指标配置
     * 
     * @param workScoreConf 工作指标配置
     * @return 结果
     */
    @Override
    public int updateWorkScoreConf(WorkScoreConf workScoreConf)
    {
        return updateById(workScoreConf) ? 1 : 0;
    }

    /**
     * 批量删除工作指标配置
     * 
     * @param ids 需要删除的工作指标配置主键
     * @return 结果
     */
    @Override
    public int deleteWorkScoreConfByIds(String[] ids)
    {
        return workScoreConfMapper.deleteWorkScoreConfByIds(ids);
    }

    /**
     * 删除工作指标配置信息
     * 
     * @param id 工作指标配置主键
     * @return 结果
     */
    @Override
    public int deleteWorkScoreConfById(String id)
    {
        return workScoreConfMapper.deleteWorkScoreConfById(id);
    }
}
